package cn.enilu.flash.bean.entity.task;

import cn.enilu.flash.bean.entity.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;

@Entity(name = "t_proof")
@Table(appliesTo = "t_proof", comment = "任务/订单凭证")
@Data
@EntityListeners(AuditingEntityListener.class)
public class Proof extends BaseEntity {
    @Column(columnDefinition = "varchar(64) comment '凭证名称'")
    private String name;
    @Column(columnDefinition = "int(1) comment '凭证类型：1文字，2图片'")
    private Integer type;
    @Column(columnDefinition = "varchar(64) comment '凭证内容，当type=1时为文字，当type=2时为图片id,多个图片id用英文,隔开'")
    private String content;
    @Column(columnDefinition = "bigint comment '任务id,当不为空时，表示未发布任务时需要收集用户的凭证'")
    private Long taskId;

    @Column(columnDefinition = "bigint comment '接任务时生成的订单id,当不为空时，表示用户所需提交的凭证'")
    private Long orderId;
}
